package com.patterns.chain;

/**
 * 领导：主任
 * @author huangke
 *
 */
public class DirectorLeader extends Leader{

	public DirectorLeader(String name) {
		super(name);
	}

	@Override
	public void handleRequest(LeaveRequest r) {
		if (r.getDays() <= 3) {
			System.out.println(this.name+":请假不超过3天，主任批准");
		}else{
			if(this.nextLeader != null){
				System.out.println(this.name+":请假超过3天，由经理审批");
				this.nextLeader.handleRequest(r);
			}
		}
	}

}
